import { createRouter, createWebHistory } from 'vue-router'
import PageIndex from '../views/index.vue';
export const routes = [
  {
    path:"/",
    component:PageIndex,
    redirect:"/login",
    children:[
      {
        path:"/home",
        name:"Home",
        component: () => import("../views/Home")
      },{
        path:"/list",
        name:"List",
        component: () => import("../views/List")
      },{
        path:"/editor",
        name:"Editor",
        component: () => import("../views/Editor")
      },{
        path:"/classify",
        name:"Classify",
        component: () => import("../views/Classify")
      },{
        path:"/label",
        name:"Label",
        component: () => import("../views/Label")
      },{
        path:"/pagerou",
        name:"PageRou",
        component: () => import("../views/PageRou")
      },{
        path:"/knowledge",
        name:"Knowledge",
        component: () => import("../views/Knowledge")
      },{
        path:"/poster",
        name:"Poster",
        component: () => import("../views/Poster")
      },{
        path:"/comment",
        name:"Comment",
        component: () => import("../views/Comment")
      },{
        path:"/mailbox",
        name:"Mailbox",
        component: () => import("../views/Mailbox")
      },{
        path:"/file",
        name:"File",
        component: () => import("../views/File")
      },{
        path:"/search",
        name:"Search",
        component: () => import("../views/Search")
      },{
        path:"/visit",
        name:"Visit",
        component: () => import("../views/Visit")
      },{
        path:"/user",
        name:"User",
        component: () => import("../views/User")
      },{
        path:"/system",
        name:"System",
        component: () => import("../views/System")
      }
    ]
  },{
    path:"/register",
    name:"Register",
    component: () => import("../views/Register/index.vue")
  },{
    path:"/login",
    name:"Login",
    component: () => import("../views/Login/index.vue")
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
